Node-RED block in Snap4City Microservice library node-red-contrib-snap4city-user is "service-search-along-path">

It allows to retrieve the set of services that are near a given GPS position. The services can be filtered as belonging to specific categories (e.g. Accommodation, Hotel, Restaurant etc). It can also be used to find services that have a WKT spatial description that contains a specific GPS position.

Inputs

A JSON with these parameters:
path string
“<WKT_string>” for a geographic path described as Well Known Text
categories string
the list of categories of the services to be retrieved separated with semicolon, if omitted all kinds of services are returned. It can contain macro categories or categories, if a macro category is specified all categories in the macro category are used. The complete list of categories and macro categories can be retrieved on servicemap.disit.org
maxresults number
maximum number of results to be returned (if parameter is missing 100 is assumed), if it is 0 all results are returned
lang string
ISO 2 chars language code (e.g. “it”, “en”, “fr”, “de”, “es”) to be used for returned descriptions if available in multiple languages. Currently for languages other than “it” and “en” it returns “en” descriptions. (if parameter is missing “en” is assumed)
model string
search for iot devices created with a specific model name.

Outputs

  1. ServiceUri Array
    Returns an array containing the servicesUri of each service found
  2. All services together
    It returns the services merge in Results section

Details

The node can receive a JSON with the parameters described in the Inputs section and with them generate the output JSON. If the values are not present in the input JSON, these are read by those in the configuration. If they are not present in either part, an error is generated for the necessary parameters.